package com.hdyg.sixg.mvp.base;

import android.text.TextUtils;

import com.hdyg.sixg.util.LangUtil.MultiLanguageType;
import com.hdyg.sixg.util.LogUtils;
import com.hdyg.sixg.util.SPUtils;
import com.hdyg.sixg.util.StringUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/5/3.
 * 传递参数工具
 */

public class GetParamUtil {
    private static Map<String, String> paramMap;//回调的map
    private final static String TOKEN = "token",
            SIGN = "sign";
    private static String LANUAGE;

    //初始化
    private static void initParamMap() {
        if (paramMap == null) {
            paramMap = new HashMap<>();
        } else {
            paramMap.clear();
        }
        String langType = SPUtils.get(SpMsg.LANG, MultiLanguageType.ZH.typeKey);
        if (langType.equals(MultiLanguageType.ZH.typeKey)) {
            LANUAGE = "zh_CN";
        } else {
            LANUAGE = "en_US";
        }
        paramMap.put("timestamp", StringUtil.random());
        paramMap.put("lang", LANUAGE);
    }

    //进行签名
    private static Map<String, String> getSignParam(Map<String, String> paramMap, boolean needToken) {
        if (needToken) {
            paramMap.put(TOKEN, SPUtils.get(SpMsg.TOKEN, ""));
        }
        paramMap.put(SIGN, StringUtil.Md5Str(paramMap, BaseUrl.KEY));
        LogUtils.d("param", "传递的参数==>" + paramMap.toString());
        return paramMap;
    }


    /**
     * 获取国家及区号
     *
     * @param country 为空则获取所有
     * @return
     */
    public static Map<String, String> getAreaCodeParam(String country) {
        initParamMap();
        if (!TextUtils.isEmpty(country)) {
            paramMap.put("country", country);
        }
        return getSignParam(paramMap, false);
    }

    /**
     * 获取登录参数
     *
     * @param username 用户名
     * @param password 密码
     * @return
     */
    public static Map<String, String> getLoginParam(String username, String password) {
        initParamMap();
        paramMap.put("username", username);
        paramMap.put("password", password);
        return getSignParam(paramMap, false);
    }

    /**
     * 注册
     *
     * @param refer            推荐人手机号码（邀请码）
     * @param username         用户名
     * @param quhao            区号
     * @param phone            手机号码
     * @param code             验证码
     * @param login_password   登录密码
     * @param confirm_login    确认登录密码
     * @param payment_password 支付密码
     * @param confirm_pay      确认支付密码
     * @return
     */
    public static Map<String, String> getRegistParam(String refer, String username, String quhao, String phone, String code, String login_password, String confirm_login,
                                                     String payment_password, String confirm_pay) {
        initParamMap();
        paramMap.put("refer", refer);
        paramMap.put("username", username);
        paramMap.put("quhao", quhao);
        paramMap.put("phone", phone);
        paramMap.put("code", code);
        paramMap.put("login_password", login_password);
        paramMap.put("confirm_login", confirm_login);
        paramMap.put("payment_password", payment_password);
        paramMap.put("confirm_pay", confirm_pay);
        return getSignParam(paramMap, false);
    }

    /**
     * 发送短信
     *
     * @param quhao 区号
     * @param phone 手机号码
     * @param type  验证类型 1：忘记密码2：修改登录密码3：修改支付密码4：绑定手机号码 5:注册
     * @return
     */
    public static Map<String, String> getSendCodeParam(String quhao, String phone, String type) {
        initParamMap();
        if (!TextUtils.isEmpty(quhao)) {
            paramMap.put("quhao", quhao);
        }
        paramMap.put("phone", phone);
        paramMap.put("type", type);
        return getSignParam(paramMap, false);
    }

    /**
     * 上传图片
     *
     * @return
     */
    public static Map<String, String> getUploadImageParam() {
        initParamMap();
        return getSignParam(paramMap, false);
    }

    /**
     * 忘记密码
     *
     * @param phone            电话号码
     * @param code             验证码
     * @param password         密码
     * @param confirm_password 确认密码
     * @return
     */
    public static Map<String, String> getForgetPwdaram(String phone, String code, String password, String confirm_password) {
        initParamMap();
        paramMap.put("phone", phone);
        paramMap.put("code", code);
        paramMap.put("password", password);
        paramMap.put("confirm_password", confirm_password);
        return getSignParam(paramMap, false);
    }

    /**
     * 获取首页数据
     *
     * @return
     */
    public static Map<String, String> getFragMainParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 获取投资数据
     *
     * @return
     */
    public static Map<String, String> getInvestParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 转入投资钱包
     *
     * @param amount  金额
     * @param trapass 交易密码
     * @return
     */
    public static Map<String, String> getTransInvestParam(String amount, String trapass) {
        initParamMap();
        paramMap.put("amount", amount);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 投资钱包记录
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getInvestWalletRecordParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 转出投资钱包
     *
     * @param amount  金额
     * @param trapass 交易密码
     * @return
     */
    public static Map<String, String> getForwardInvestParam(String amount, String trapass) {
        initParamMap();
        paramMap.put("amount", amount);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 托管页面
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getDepositParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 进行托管
     *
     * @param cointype 币种ID
     * @param amount   托管数量
     * @param trapass  交易密码
     * @return
     */
    public static Map<String, String> getStartDepositParam(String cointype, String amount, String trapass) {
        initParamMap();
        paramMap.put("cointype", cointype);
        paramMap.put("amount", amount);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 充值数据
     *
     * @return
     */
    public static Map<String, String> getRechargeParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 充值申请
     *
     * @param picture 凭证图片路径（多张图片逗号隔开）
     * @return
     */
    public static Map<String, String> getApplyRechargeParam(String picture) {
        initParamMap();
        paramMap.put("picture", picture);
        return getSignParam(paramMap, true);
    }

    /**
     * 提现页面
     *
     * @return
     */
    public static Map<String, String> getCashParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 提现申请
     *
     * @param amount  金额
     * @param payPass 交易密码
     * @return
     */
    public static Map<String, String> getApplyCashParam(String amount, String payPass) {
        initParamMap();
        paramMap.put("amount", amount);
        paramMap.put("payPass", payPass);
        return getSignParam(paramMap, true);
    }

    /**
     * 转账页面
     *
     * @return
     */
    public static Map<String, String> getTransferParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 转账申请
     *
     * @param walletaddress 收款地址
     * @param amount        转账数量
     * @param trapass       交易密码
     * @return
     */
    public static Map<String, String> getApplyTransParam(String walletaddress, String amount, String trapass) {
        initParamMap();
        paramMap.put("walletaddress", walletaddress);
        paramMap.put("amount", amount);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 智能钱包页面
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getSmartWalletParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 智能钱包转出页面
     *
     * @param type 1：定存 2：活期
     * @return
     */
    public static Map<String, String> getSmartTransParam(String type) {
        initParamMap();
        paramMap.put("type", type);
        return getSignParam(paramMap, true);
    }

    /**
     * 智能钱包转出申请
     *
     * @param type    类型 1：定期钱包 2：活期钱包
     * @param id      转出类型
     * @param trapass 交易密码
     * @return
     */
    public static Map<String, String> getApplySmartTransParam(String type, String id, String trapass) {
        initParamMap();
        paramMap.put("type", type);
        paramMap.put("id", id);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 数字钱包记录
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getDigitalRecordParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 数字钱包绑定
     *
     * @param wallet_token 数字钱包地址
     * @param coin_type    币种类型 1：ETH 2：USDT
     * @return
     */
    public static Map<String, String> getDigitalBindParam(String wallet_token, String coin_type) {
        initParamMap();
        paramMap.put("wallet_token", wallet_token);
        paramMap.put("coin_type", coin_type);
        return getSignParam(paramMap, true);
    }

    /**
     * 数字钱包提现页面
     *
     * @param type 1：ETH 2:USDT
     * @return
     */
    public static Map<String, String> getDigitalCashParam(String type) {
        initParamMap();
        paramMap.put("type", type);
        return getSignParam(paramMap, true);
    }

    /**
     * 数字钱包提现
     *
     * @param type    1:ETH 2:USDT
     * @param amount  提现数量
     * @param trapass 交易密码
     * @return
     */
    public static Map<String, String> getApplyDigitalCashParam(String type, String amount, String trapass) {
        initParamMap();
        paramMap.put("type", type);
        paramMap.put("amount", amount);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 币币初始化
     *
     * @return
     */
    public static Map<String, String> getBibiInitParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 币币交易-确定
     *
     * @param coin_type      兑换币种类型1：ETH 2：USDT
     * @param convert_number 兑换量
     * @param transpwd       交易密码
     * @return
     */
    public static Map<String, String> getBibiTransParam(String coin_type, String convert_number, String transpwd) {
        initParamMap();
        paramMap.put("coin_type", coin_type);
        paramMap.put("convert_number", convert_number);
        paramMap.put("password", transpwd);
        return getSignParam(paramMap, true);
    }

    /**
     * 全部挂售
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getAllOrderParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 我的挂售
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getHandUpOrderParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 我的购买
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getBuyOrderParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 我的出售
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getSellOrderParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 购买页面
     *
     * @param orderid 订单ID
     * @return
     */
    public static Map<String, String> getBuyParam(String orderid) {
        initParamMap();
        paramMap.put("orderid", orderid);
        return getSignParam(paramMap, true);
    }

    /**
     * 进行购买
     *
     * @param amount  购买数量
     * @param trapass 交易密码
     * @param orderid 购买订单
     * @return
     */
    public static Map<String, String> getApplyBuyParam(String amount, String trapass, String orderid) {
        initParamMap();
        paramMap.put("amount", amount);
        paramMap.put("trapass", trapass);
        paramMap.put("orderid", orderid);
        return getSignParam(paramMap, true);
    }

    /**
     * 挂售
     *
     * @return
     */
    public static Map<String, String> getHandUpParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 确认挂售
     *
     * @param sellamount   挂售数量
     * @param single_price 估值
     * @param trapass      交易密码
     * @return
     */
    public static Map<String, String> getSellHandUpParam(String sellamount, String single_price, String trapass) {
        initParamMap();
        paramMap.put("sellamount", sellamount);
        paramMap.put("single_price", single_price);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 下架
     *
     * @param trade_id 挂单ID
     * @return
     */
    public static Map<String, String> getDownSellParam(String trade_id) {
        initParamMap();
        paramMap.put("trade_id", trade_id);
        return getSignParam(paramMap, true);
    }

    /**
     * 出售/购买详情
     *
     * @param id 交易ID
     * @return
     */
    public static Map<String, String> getSellDetailParam(String id) {
        initParamMap();
        paramMap.put("id", id);
        return getSignParam(paramMap, true);
    }

    /**
     * 上传凭证
     *
     * @param id  交易ID
     * @param pic 图片路径
     * @return
     */
    public static Map<String, String> getTradPicParam(String id, String pic) {
        initParamMap();
        paramMap.put("id", id);
        paramMap.put("pic", pic);
        return getSignParam(paramMap, true);
    }

    /**
     * 确认订单（卖家确认收款）
     *
     * @param id 交易ID
     * @return
     */
    public static Map<String, String> getTradSureParam(String id) {
        initParamMap();
        paramMap.put("id", id);
        return getSignParam(paramMap, true);
    }

    /**
     * 油卡页面初始化
     *
     * @return
     */
    public static Map<String, String> getInitOilParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 油卡/话费申请
     *
     * @param cardCode 油卡卡号
     * @param id       充值金额id
     * @param type     充值type 1：油卡 2：话费
     * @return
     */
    public static Map<String, String> getApplyOilParam(String cardCode, String id, String type) {
        initParamMap();
        paramMap.put("cardCode", cardCode);
        paramMap.put("id", id);
        paramMap.put("type", type);
        return getSignParam(paramMap, true);
    }

    /**
     * 充值话费页面初始化
     *
     * @return
     */
    public static Map<String, String> getInitPhoneParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 我的
     *
     * @return
     */
    public static Map<String, String> getMineParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 手机号码
     *
     * @return
     */
    public static Map<String, String> getPhoneParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 验证旧号码
     *
     * @param code 验证码
     * @return
     */
    public static Map<String, String> getCheckPhoneParam(String code) {
        initParamMap();
        paramMap.put("code", code);
        return getSignParam(paramMap, true);
    }

    /**
     * 绑定新手机号码
     *
     * @param code      验证码
     * @param new_quhao 新区号
     * @param new_phone 新手机号
     * @return
     */
    public static Map<String, String> getBindPhoneParam(String code, String new_quhao, String new_phone) {
        initParamMap();
        paramMap.put("code", code);
        paramMap.put("new_quhao", new_quhao);
        paramMap.put("new_phone", new_phone);
        return getSignParam(paramMap, true);
    }

    /**
     * 修改登录/支付密码
     *
     * @param code             验证码
     * @param type             类型 1:修改登录密码 2：修改支付密码
     * @param new_password     新密码
     * @param confirm_password 确认密码
     * @return
     */
    public static Map<String, String> getChangePwdParam(String code, String type, String new_password, String confirm_password) {
        initParamMap();
        paramMap.put("code", code);
        paramMap.put("type", type);
        paramMap.put("new_password", new_password);
        paramMap.put("confirm_password", confirm_password);
        return getSignParam(paramMap, true);
    }

    /**
     * 获取个人资料
     *
     * @return
     */
    public static Map<String, String> getMineInfoParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 完善资料
     *
     * @param bankname    开户姓名
     * @param bank_open   银行名称
     * @param bankadd     开户地区
     * @param bank_branch 开户支行
     * @param bankcard    银行卡号
     * @param bankphone   联系手机
     * @param alipay      支付宝账号
     * @return
     */
    public static Map<String, String> getCompleteInfoParam(String bankname, String bank_open, String bankadd, String bank_branch,
                                                           String bankcard, String bankphone, String alipay) {
        initParamMap();
        paramMap.put("bankname", bankname);
        paramMap.put("bank_open", bank_open);
        paramMap.put("bankadd", bankadd);
        paramMap.put("bank_branch", bank_branch);
        paramMap.put("bankcard", bankcard);
        paramMap.put("bankphone", bankphone);
        paramMap.put("alipay", alipay);
        return getSignParam(paramMap, true);
    }

    /**
     * 我的团队
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getMyTeamParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 分享推广
     *
     * @return
     */
    public static Map<String, String> getShareParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 申请商家
     *
     * @return
     */
    public static Map<String, String> getApplyMerchantParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 申诉
     *
     * @param content 申诉内容
     * @param picture 申诉凭证
     * @return
     */
    public static Map<String, String> getApplyAppealParam(String content, String picture) {
        initParamMap();
        paramMap.put("content", content);
        paramMap.put("picture", picture);
        return getSignParam(paramMap, true);
    }

    /**
     * 申诉记录
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getAppealRecordParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 公告列表
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getNoticeParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 公告详情
     *
     * @param notice_id 公告id
     * @return
     */
    public static Map<String, String> getNoticeDetailParam(String notice_id) {
        initParamMap();
        paramMap.put("notice_id", notice_id);
        return getSignParam(paramMap, true);
    }

    /**
     * 扫一扫初始化
     *
     * @return
     */
    public static Map<String, String> getScanInitParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 扫一扫支付
     *
     * @param to_user_id 付款对象（收款人）
     * @param pay_amount 付款金额（元）
     * @param password   支付密码
     * @return
     */
    public static Map<String, String> getScanPayParam(String to_user_id, String pay_amount, String password) {
        initParamMap();
        paramMap.put("to_user_id", to_user_id);
        paramMap.put("pay_amount", pay_amount);
        paramMap.put("password", password);
        return getSignParam(paramMap, true);
    }

    /**
     * 获取收货地址
     *
     * @return
     */
    public static Map<String, String> getAddressParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 保存收货地址
     *
     * @param name    收货人
     * @param phone   联系电话
     * @param country 省
     * @param city    市
     * @param region  区
     * @param address 详细地址
     * @return
     */
    public static Map<String, String> getSaveAddressParam(String name, String phone, String country, String city, String region, String address) {
        initParamMap();
        paramMap.put("name", name);
        paramMap.put("phone", phone);
        paramMap.put("country", country);
        paramMap.put("city", city);
        paramMap.put("region", region);
        paramMap.put("address", address);
        return getSignParam(paramMap, true);
    }

    /**
     * 申请股东
     *
     * @return
     */
    public static Map<String, String> getApplyHolderParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 获取智能钱包
     *
     * @param page
     * @return
     */
    public static Map<String, String> getSmartRecordParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 获取矿机钱包
     *
     * @param page
     * @return
     */
    public static Map<String, String> getRockRecordParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 获取股权
     *
     * @param page
     * @return
     */
    public static Map<String, String> getStockRecordParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 提币初始化
     *
     * @return
     */
    public static Map<String, String> getCashBiInitParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 提币申请
     *
     * @param type          类型
     * @param amount        数量
     * @param trapass       密码
     * @param walletaddress 地址
     * @return
     */
    public static Map<String, String> getCashBiApplyParam(String type, String amount, String trapass, String walletaddress) {
        initParamMap();
        paramMap.put("type", type);
        paramMap.put("amount", amount);
        paramMap.put("trapass", trapass);
        paramMap.put("walletaddress", walletaddress);
        return getSignParam(paramMap, true);
    }

    /**
     * 矿机
     *
     * @param page
     * @return
     */
    public static Map<String, String> getMiniParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 矿机商城
     *
     * @param page
     * @return
     */
    public static Map<String, String> getMiniShopParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 购买矿机
     *
     * @param id 矿机ID
     * @return
     */
    public static Map<String, String> getBuyMiniParam(String id) {
        initParamMap();
        paramMap.put("id", id);
        return getSignParam(paramMap, true);
    }

    /**
     * 购买矿机提交
     *
     * @param id          id
     * @param trapassword 交易密码
     * @param payid       支付方式ID
     * @return
     */
    public static Map<String, String> getBuyMiniSubmitParam(String id, String trapassword, String payid) {
        initParamMap();
        paramMap.put("id", id);
        paramMap.put("password", trapassword);
        paramMap.put("payid", payid);
        return getSignParam(paramMap, true);
    }

    /**
     * 激活矿机
     *
     * @param code 序列号
     * @return
     */
    public static Map<String, String> getActiveMiniParam(String code) {
        initParamMap();
        paramMap.put("code", code);
        return getSignParam(paramMap, true);
    }

    /**
     * 智能理财页面
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getSmartManageParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 转入智能理财
     *
     * @param id       钱包类型ID
     * @param amount   转入数量
     * @param password password
     * @return
     */
    public static Map<String, String> getTransSmartManageParam(String id, String amount, String password) {
        initParamMap();
        paramMap.put("id", id);
        paramMap.put("amount", amount);
        paramMap.put("password", password);
        return getSignParam(paramMap, true);
    }

    /**
     * 赎回
     *
     * @param id 赎回id
     * @return
     */
    public static Map<String, String> getRedemptionParam(String id) {
        initParamMap();
        paramMap.put("id", id);
        return getSignParam(paramMap, true);
    }

    /**
     * 确认赎回
     *
     * @param id       赎回id
     * @param password 密码
     * @return
     */
    public static Map<String, String> getSureRedemptionParam(String id, String password) {
        initParamMap();
        paramMap.put("id", id);
        paramMap.put("tradpass", password);
        return getSignParam(paramMap, true);
    }

    /**
     * 流通钱包
     *
     * @param page 页数
     * @param id   记录类型
     * @return
     */
    public static Map<String, String> getCurrentMoneyParam(int page, String id) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        paramMap.put("id", id);
        return getSignParam(paramMap, true);
    }

    /**
     * 收益记录
     *
     * @param page 页数
     * @return
     */
    public static Map<String, String> getIncomeRecordParam(int page) {
        initParamMap();
        paramMap.put("page", String.valueOf(page));
        return getSignParam(paramMap, true);
    }

    /**
     * 实名认证初始化
     *
     * @return
     */
    public static Map<String, String> getRealNameParam() {
        initParamMap();
        return getSignParam(paramMap, true);
    }

    /**
     * 提交实名信息
     *
     * @param country_id 国籍ID
     * @param name       姓名
     * @param card       身份证号
     * @param front_img  身份证正面
     * @param back_img   身份证反面
     * @return
     */
    public static Map<String, String> getSubmitInfoParam(String country_id, String name, String card, String front_img, String back_img) {
        initParamMap();
        paramMap.put("country_id", country_id);
        paramMap.put("name", name);
        paramMap.put("card", card);
        paramMap.put("front_img", front_img);
        paramMap.put("back_img", back_img);
        return getSignParam(paramMap, true);
    }

    /**
     * 挖矿
     *
     * @param mine_id 矿机ID
     * @return
     */
    public static Map<String, String> getMiningParam(String mine_id) {
        initParamMap();
        paramMap.put("mine_id", mine_id);
        return getSignParam(paramMap, true);
    }

    /**
     * 转出页面
     *
     * @param id 投资ID
     * @return
     */
    public static Map<String, String> getManageTransInitParam(String id) {
        initParamMap();
        paramMap.put("id", id);
        return getSignParam(paramMap, true);
    }

    /**
     * 转出
     *
     * @param id      投资ID
     * @param trapass 交易密码
     * @return
     */
    public static Map<String, String> getManageTransParam(String id, String trapass) {
        initParamMap();
        paramMap.put("id", id);
        paramMap.put("trapass", trapass);
        return getSignParam(paramMap, true);
    }

    /**
     * 版本更新接口
     *
     * @return paramMap
     */
    public static Map<String, String> getVersionParam() {
        initParamMap();
        paramMap.put("type", "1"); //1：安卓 2：IOS
        return getSignParam(paramMap, false);
    }

}
